package com.zyh.A;

public class Test1 {
    public static void main(String[] args) {
        /*
        求1-100的整数中能同时被3和5整除的数的和
         */
        int sum = 0;
        for (int i = 1; i < 101; i++) {
            if (i % 3 == 0 && i % 5 == 0) {
                sum = sum + i;
            }
        }
        System.out.println("1-100的整数中能同时被3和5整除的数的和为：" + sum);
    }
}
